﻿using Autofac;
using HproseRpcTester.RpcClient;
using HproseRpcTester.Utils;

namespace HproseRpcTester.Service
{
    public interface IRPCServiceBase
    {
        IRunRPCEx RunRPC { get; }
    }

    public abstract class RPCServiceBase : RPCBase, IRPCServiceBase
    {
        private IRunRPCEx runRPC;
        public IRunRPCEx RunRPC => runRPC ?? (runRPC = AutofacHelper.Container?.Resolve<IRunRPCEx>() ?? null);
    }
}
